1. Field of the Invention
The present invention relates to a storage device provided with a dynamic random access memory (DRAM) or other semiconductor memory which requires a refresh for memory retention, an image processing apparatus and method of the same, and a refresh controller for controlling the refresh of the semiconductor memory and a method of the same.
2. Description of the Related Art
Computer graphics are often used in a variety of computer aided design (CAD) systems and in amusement machines. Especially, along with the recent advances in image processing techniques, systems using three-dimensional computer graphics are rapidly spreading.
In three-dimensional computer graphics, the color value of each pixel is calculated at the time of deciding the color of each corresponding pixel. Then, rendering is performed for writing the calculated value to an address of a display buffer (frame buffer memory) corresponding to the pixel.
One of the rendering methods is polygon rendering. In this method, a three-dimensional model is expressed as a composite of triangular unit graphics (polygons). By drawing using the polygons as units, the colors of the pixels of the display screen are decided.
In the above system, an image signal (data) obtained by the graphic processing is written (drawn) in an image memory. Then the image signal is read and output on a display such as a cathode ray tube (CRT).
As the image memory, semiconductor memories, such as a DRAM, are generally used.
A DRAM is configured by using a plurality of memory cells for storing data by accumulating charges in capacitors. The charges accumulated in the capacitors in such memory cells are lost along with time, so it is necessary to regularly refresh (recharge) the capacitors in the memory cells in order to maintain the stored data.
Note that writing and reading of data are prohibited during a refresh.
Accordingly, when using a DRAM as an image memory, in order to prevent deterioration of the picture quality of the image on the display by a refresh operation, a predetermined number of refreshes are performed during a horizontal blanking interval and vertical blanking interval of the image signal.
Also, in such an image memory, the image signal is drawn (written) during a time when a refresh is not being performed in the horizontal blanking interval and the vertical blanking interval when displaying the image on the display. The image signal read from the image memory is output to the display during display intervals.
In this case, because a refresh is essential for maintaining the storage of the image signal in the image memory, a refresh is given priority over a write operation of an image signal within the horizontal blanking interval and the vertical blanking interval.
Turning now to the problem to be solved by the present invention, the load of writing an image signal to an image memory varies in accordance with the resolution of the image corresponding to the image signal and the contents of the image signal.
Accordingly, if a refresh of the image memory is performed at fixed time intervals as in the related art, both the refresh and the write operation of the image signal to the image memory cannot be carried out within a blanking interval. As explained above, the refresh is given priority. Therefore, there is a possibility that a part of the image signal will not be able to be written in the image memory. In this way, there is a problem of deterioration of the displayed image when the necessary image signal cannot be written in the image memory.
Also, if a refresh of the image memory is performed at fixed time intervals as in the related art, the load of the semiconductor memory becomes heaviest when the load of writing is the heaviest, so that the peak of the power consumption becomes high along with that. Here, it is necessary to use interconnections, circuit elements, etc. in the semiconductor memory which have large capacities commensurate with the peak of the power consumption. Therefore, there is the problem that the semiconductor memory becomes large in size.